function initMetrologyLib(basedir)
%INITMETROLOGYLIB Initialise the CamBar metrology system by means of metrolib.dll.
%   Initialises the CamBar metrology system by means of metrolib.dll. This
%   is sometimes necessary because it is not known how initialising the
%   flash controller has to be done. Functionality for that is included in
%   the proprietary metrolib.dll.
%
%   Initialisation is done via an x86 EXE binary, as metrolib.dll is only
%   available in a x86 version.

system(['path = %PATH%;' fullfile(basedir, '..', '..', 'libs', 'x86')]); % Set path to the x86 metrolib.dll
[status, result] = system( fullfile(basedir, '\MarkerPositions\functions\initMetrologyLib.exe') );
fprintf('%s\n', result);
if status == 1
    error('No measurement system found.');
end